<article class="module-account module-account-basic">
    <div class="ui-account-box">
        <div class="account-box">
            <h3 class="ui-title">{{ $t('c2c.payType') }}</h3>
            <div class="basic-info-box ">
                <div class="box-left">
                    <div class="tr">
                        <div class="td">{{ $t('c2c.alipayLabel') }}</div>
                        <div class="td">
                            <loading type="inline" v-if="isLoading === true"></loading>
                            <template v-else>
                                <template v-if="alipayInfo">
                                    <span >{{alipayInfo.name}}&nbsp;&nbsp;{{format.getEncryptedText(alipayInfo.alipayNo)}}</span>&nbsp;&nbsp;
                                    <a href="javascript:;" class="link" @click="doAlipay('MOD')">{{ $t('c2c.updateText') }}</a>
                                </template>
                                <span v-if="!alipayInfo"><a @click="doAlipay('ADD')" href="javascript:;">{{$t('c2c.addText') }}</a></span>
                            </template>
                        </div>
                    </div>
                </div>
            </div>
            <div class="basic-info-box ">
                <div class="box-left">
                    <div class="tr">
                        <div class="td">{{ $t('c2c.bankLabel') }}</div>
                        <div class="td">
                            <loading type="inline" v-if="isLoading === true"></loading>
                            <template v-else>
                                <template v-if="bankInfo">
                                    <span>{{bankInfo.name}}&nbsp;&nbsp;{{bankInfo.bank}}&nbsp;&nbsp;{{format.getSuffixBank(bankInfo.acnumber)}}</span>&nbsp;&nbsp;
                                    <a href="javascript:;" class="link" @click="doBank('MOD')">{{ $t('c2c.updateText') }}</a>
                                </template>
                                <span v-if="!bankInfo"><a @click="doBank('ADD')" href="javascript:;">{{ $t('c2c.addText') }}</a></span>
                            </template>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <template class="conponent">
        <template v-if="isShowAlipay === true && doType === 'MOD'">
            <add-alipay type="MOD"
                        :info="alipayInfo"
                        v-on:hideDialog='isShowAlipay = false'
                        :on-success="onAddAlipaySuccess">
            </add-alipay>
        </template>
        <template v-if="isShowAlipay === true && doType === 'ADD'">
            <add-alipay type="ADD"
                        v-on:hideDialog='isShowAlipay = false'
                        :on-success="onAddAlipaySuccess">
            </add-alipay>
        </template>
        <template v-if="isShowBank === true && doType === 'MOD'">
            <add-bank-card type="MOD"
                           :info="bankInfo"
                           v-on:hideDialog='isShowBank = false'
                           :on-success="onAddBankSuccess">
            </add-bank-card>
        </template>
        <template v-if="isShowBank === true && doType === 'ADD'">
            <add-bank-card type="ADD"
                           :info="bankInfo"
                           v-on:hideDialog='isShowBank = false'
                           :on-success="onAddBankSuccess">
            </add-bank-card>
        </template>
    </template>
</article>